Operating Systems Lab Manual / OS Memory Management with Fixed Partitioning Technique C Program

Program Name Write a C Program for OS Memory Management with Fixed Partitioning Technique C Program.
Theory
In this the memory is divided in two parts and process is fit into it. The process which is best suited will be placed in the particular memory where it suits. In MFT, the memory is partitioned into fixed size partitions and each job is assigned to a partition. The memory assigned to a partition does not change. In MVT, each job gets just the amount of memory it needs. That is, the partitioning of memory is dynamic and changes as jobs enter and leave the system. MVT is a more ``efficient'' user of resources. MFT suffers with the problem of internal fragmentation and MVT suffers with external fragmentation.
Program
Input
Enter Total Available Memory  (in Bytes):100
Enter Block size (in Bytes): 300

Enter Number of processes:5
Enter memory required for process 1 (in Bytes):275
Enter memory required for process 2 (in Bytes):401
Enter memory required for process 3 (in Bytes):292
Enter memory required for process 4 (in Bytes):291
Enter memory required for process 5 (in Bytes):101
Output
Number of Blocks Available in memory: 0

PROCESS 	 MEMORY REQUIRED	 ALLOCATED 	 INTERNAL FRAGMENTATION
Memory is Full, Remaining Processes cannot be accomodated

Total Internal Fragmentation is 0
Total External Fragmentation is 100


Home     Back